<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="vue.min.js"></script>
</head>
<body>
    <div id="app">
        <h1>遍历</h1>
        <body-comp></body-comp>
         </div>
    <template id="muban">
        <ul>
            <li v-for="item in list">{{item}}</li>
        </ul>
    </template>
   
    
    <script>
          new Vue({
            el:"#app",
            components:{
                "body-comp":{
                    data:function(){
                        return{
                            list:["火龙果","荔枝","芒果"]
                        }
                    },
                    template:"#muban"
                }
            }
        })
    </script>
</body>
</html>